/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.myapp.actions.user;

import com.myweb.WebAction;
import com.myweb.WebException;
import com.myweb.WebRequest;
import com.myweb.WebResponse;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;

/**
 *
 * @author DTIT
 */
public class LogoutUser implements WebAction {

  @Override
  public void prepare(WebRequest request) throws WebException {
    
  }

  @Override
    public EntityManager process(WebRequest req, WebResponse res, EntityManager em) throws Exception {
    req.getSession().invalidate();
    return null;
  }
}
